import { RouteConfig } from "vue-router";
import Layout from "@/layout/index.vue";

const rulesRouter: RouteConfig = {
  path: "/rules",
  component: Layout,
  redirect: "/rules/index",
  name: "RuleManage",
  meta: {
    title: "rulesManage",
    icon: "iconfont icon-userstoryicon",
    authrole: 'system_admin',
    routerRuleName: "RuleManage"
  },
  children: [
    {
      path: "system_manager",
      component: () => import("@/views/user/system_manager.vue"),
      name: "UserSystemManager",
      meta: {
        title: "userSystemManager",
        noCache: true,
        authrole: 'system_admin'
      }
    },
    {
      path: "index",
      component: () => import("@/views/rulesManage/rule_index.vue"),
      name: "Rule",
      meta: {
        title: "ruleIndex",
        noCache: true,
        routerRuleName: "Rule"
      }
    }
  ]
};

export default rulesRouter;
